package com.yanqu.road.server.agent.inter;

import com.alibaba.fastjson.JSONObject;
import com.yanqu.road.entity.enums.eAgentErrorCode;
import com.yanqu.road.server.agent.AgentInterfaceMgr;
import com.yanqu.road.server.manger.player.WorldMessageMgr;

public class AgentNotice {

	public String sendNotice(JSONObject param) {
		JSONObject resultObj = AgentInterfaceMgr.getDefaultRet();

		String content = param.getString("content");
		long time = param.getLong("time");
		if (time == 0) {
			userCenterMsg(content);
		}

		AgentInterfaceMgr.setCommonRet(resultObj, eAgentErrorCode.Success.getValue());
		return resultObj.toString();
	}

	private void userCenterMsg(String speak) {
		WorldMessageMgr.userCenterMsg(speak);
	}
}
